import { notFound } from 'next/navigation'; import { fetchJson } from '@/lib/utils/server'; import { fetchUserFeed } from '@/lib/api/account/profile'; import { ResultDto } from '@/types/response/common'; import { ChannelDetail } from '@/types/channel'; import FeedList from '@/app/(main)/feed/_component/FeedList'; type Props = { params: Promise<{ identifier: string }>; }; export default async function ChannelPostsPage({ params }: Props) { const { identifier } = await params; const chRes: ResultDto = await fetchJson(`/api/channel/${encodeURIComponent(decodeURIComponent(identifier))}`, { method: 'GET' }); if (!chRes.data) { notFound(); } const memberSID = chRes.data.memberSID; const feedRes = await fetchUserFeed(memberSID, 1, 20); const data = feedRes.data ?? { total: 0, list: [], authorSID: memberSID, authorName: chRes.data.name }; return (
); }